﻿<UserControl x:Class="MContracts.View.PaymentsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:MControls="clr-namespace:MContracts.Controls"
             xmlns:converters="clr-namespace:MContracts.Classes.Converters" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <!--<Expander IsExpanded="{Binding IsMaximized, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">-->
        <Expander Background="{StaticResource Expander-Background-Payments-Brush}" IsExpanded="{Binding IsMaximized, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
            <Expander.Resources>
            <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" TrueVisibility="Visible" FalseVisibility="Collapsed" />
        </Expander.Resources>
            <Expander.Header>
            <WrapPanel>
                <Image Source="/MContracts;component/Images/company_dnd.png" Width="30"></Image>
                <Label>Платёжные документы</Label>
                <MControls:CommandsControl x:Name="commandsControl" Visibility="{Binding IsExpanded, RelativeSource={RelativeSource AncestorType=Expander}, Converter={StaticResource BoolToVisibilityConverter}}"></MControls:CommandsControl>
            </WrapPanel>
        </Expander.Header>

        <Expander.Content>
            <MControls:PaymentDocumentsViewControl></MControls:PaymentDocumentsViewControl>
        </Expander.Content>
    </Expander>
</UserControl>
